let header = new Vue({
	el:"#header",
	data: {
		user: {},
		checkLogin: false,
		carts: []
	},
	mounted: function(){
		axios.get("/member/checkLogin").then( rt =>{
			if(rt.status == 200 && rt.data.code == 200){
				this.checkLogin = true;
				this.user = rt.data.data;	
				this.findCart();
				return;
			}
			this.checkLogin = false;
		})
	},
	methods: {
		findCart: function() {
			axios.get("/cart/finds").then(rt =>{
				if(rt.status ==200 && rt.data.code == 200){
					this.carts = rt.data.data;
					return;
				}
				this.carts = [];
			})
		}
	}
})